/**
 *
 * @constructor
 */
window.Program = window.Program || { version: '1.0' }
Program.Constant = (function () {
    return {
        //baseApiUrl:"http://test.admin.epg.qiyi.domain/api/",
        baseApiUrl: "/api/",
        thirdUrl_audit_people: "http://lego.iqiyi.com/suggest/audit-people",
        originalUrl: "http://10.23.84.18:8500/",
        thirdUrl_qitan_url: "http://api.t.iqiyi.com/qx_api/resource/get_id_by_name",
        thirdUrl_add_qitan_url: "http://api.t.iqiyi.com/qx_api/resource/add_resource",
        thirdUrl_video_url: "http://lego.iqiyi.com/suggest/simple-video",
        thirdUrl_album_url: "http://lego.iqiyi.com/suggest/album",
        thirdUrl_playlist_url: "http://lego.iqiyi.com/suggest/playlist",
        thirdUrl_channel_url: "http://lego.iqiyi.com/apis/channel/list",
        thirdUrl_category_first_list_url: "http://lego.iqiyi.com/apis/category/live-first-list",
        // use for child secLv thirdLv
        thirdUrl_category_child_list_url: "http://lego.iqiyi.com/category/list",
      //  thirdUrl_passport_url:"http://passport.qiyi.domain/apis/internal/user_info.action",
        thirdUrl_passport_nk_url:"http://passport.qiyi.domain/apis/inner/info/byNick.action",
        thirdUrl_passport_uid_url:"http://passport.qiyi.domain/apis/inner/info/byUid.action",
  //      http://lego.iqiyi.com/competition/match/suggest?matchName=奥运&size=10
        thirdUrl_sport_match_url: auth.dev()? "http://lego.iqiyi.com/competition/match/suggest":"http://new.lego.iqiyi.com/competition/match/suggest",
        devMode: auth.dev()

    }
})()
Program.urlConfig = (function () {
    var useUrl = Program.Constant.baseApiUrl;
    var programListUrl = useUrl + "program/list";
    var programListSortUrl = useUrl + "program/listSort";
    var programAddUrl = useUrl + "program/add";
    var programDelUrl = useUrl + "program/delete";
    var programEditUrl = useUrl + "program/edit";
    var configsUrl = useUrl + "configs";
    var channelListUrl = useUrl + "channel/list";
    var programSyncUrl = useUrl + "program/syncTVMao";
    var redirectUrl = useUrl + "redirect";
    var passportRequestUrl = useUrl + "redirect/passport";
    var channelGetUrl = useUrl + "channel/get";
    var queryPuYuUrl = useUrl + "program/queryPuYu";
    var programForceCheckUrl = useUrl + "program/forceCheck";
    var unbindSportUrl = useUrl + "program/sport/unbind";
    function getQiPuBaseUrl(qipuId) {
        var plusUrl = Program.Constant.devMode ? "http://qipu-test.qiyi.domain/int/entity/nocache/@.json" : "http://qipu.qiyi.domain/int/entity/nocache/@.json";
        return plusUrl.replace("@", "" + qipuId);
    }

    return {
        programList: programListUrl,
        programListSortUrl: programListSortUrl,
        programAdd: programAddUrl,
        programDel: programDelUrl,
        programEdit: programEditUrl,
        programForceCheck: programForceCheckUrl,
        configs: configsUrl,
        channelList: channelListUrl,
        channelGet: channelGetUrl,
        programSyncUrl: programSyncUrl,
        queryPuYu: queryPuYuUrl,
        redirect: redirectUrl,
        passportRequest: passportRequestUrl,
        unbindSportUrl:unbindSportUrl,
        getQiPuBaseUrl: getQiPuBaseUrl
    }
})();
Program.ajaxManager = new AjaxQueue()
Program.memo = {}

